﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tenta_v2
{
    public class Node<TKey, TValue> where TValue : class
    {
        public TKey Key { get; set; }
        public TValue Data { get; set; }
        public Node<TKey, TValue> Next { get; set; }

        public Node(TKey key = default(TKey), TValue data = default(TValue), Node<TKey, TValue> next = null)
        {
            this.Key = key;
            this.Data = data;
            this.Next = next;
        }

        public void Print()
        {
            Console.Write(string.Format("- {0,8:X} : {1,4} : {2,4} ", Key.GetHashCode(), Key.ToString(), Data.ToString()));
            if (Next != null)
                Next.Print();
        }
    }
}
